sudo sed -i 's/dns-nameserver/#dns-nameserver/g' /etc/network/interfaces
sudo resolvconf -u

sed -i 's/#alias ll=/alias ll=/g' ~/.bashrc
sed -i 's/#alias la=/alias la=/g' ~/.bashrc
sed -i 's/#alias l=/alias l=/g' ~/.bashrc

. ~/.bashrc

sudo tee /etc/apt/sources.list <<-'EOF'
# 默认注释了源码镜像以提高 apt update 速度，如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
EOF

sudo apt update && sudo apt upgrade -y
sudo apt update && sudo apt install -y --no-install-recommends ntpdate locales fonts-powerline wget curl zsh

sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
sudo ntpdate -u time1.aliyun.com
sudo hwclock --systohc
sudo hwclock -w

sudo apt autoremove
sudo apt autoclean

# sudo reboot

echo "export LANG=zh_CN.UTF-8" >> .zshrc

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
